home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Gigarom 1
/
Gigarom Macintosh Archives (Quantum Leap)(CDRM1080320)(1993).iso
/
FILES
/
DEV
/
I-Z
/
RA.cpt
/
NewStrings.ra
< prev
next >
Wrap
Text File
|
1986-12-11
|
1KB
|
71 lines
|
| RA™
| String functions
|
| © 1986 COM~LINK & S.Koren
|
#M;
"Ver 0.2 of RA now has the following!new string functions:!!"
"query for string!string length!"
"find substring!concatenate strings!"
"insert substring!delete substring!copy substring"
#A;
"Enter any string : "
¿ | ask user for string
A†∂
"!You entered the string: " A∂ ††
"!The length of the string is: " A∂
Å ! | print the length of the string
"!Enter another string: "¿
B†∂
"!The second string was: " B∂ ††
"!The length of the string is: " B∂ Å !"!"
A∂ B∂ ◊ A: | find position of a in b
A. [A∂ "'"††"' was a substring of '" B∂ †† "'!in position " A. ! "!"]
A.ß [A∂ "'"†† "' was not a substring of '" B∂ ††"'!"]
A∂ B∂
Æ | concatenate the strings
"'" C†∂ C∂†† "' is the concatenated string.!"
"Its length is " C∂Å ! "."
#A;
†aaaaaa† A†∂ A∂ †† " is string A!"
†bbbb† B†∂ B∂ †† " is string B!"
A∂ B∂ 3 †+ C†∂ C∂ †† " is string A inserted !in string B at position 3.!"
C∂ 3 3 †- †† " is that string with!"
"positions 3 thru 6 deleted.!"
†This is a test string† A†∂
A∂ ††
"!"
A∂ 2 7 †ç "'"††"'" " is the substring from !location 2 thru 7.!"
#A;
"THE END."
$
&A
"!Hit any key: " ?§ µ @`
|
| RA title routine
|
&M
#P,5,5;
#G,10,10;
#L,225,10;
#L,225,105;
#L,10,105;
#L,10,10;
#O; #Q;`
&G 1% 2% •0A893º¶ `
&L 1% 2% •0A891º¶ `
&O
40 100 Ω
"RA™"
60 40 Ω
"© 1986/7 COM~LINK & S.Koren"
80 60 Ω
"All rights reserved." `
&P 1% 2% •0A89Bº¶ `
&Q ?§ @ µ`
$